package vietnam.traveltools.adapter;

import vietnam.traveltools.MapsActivity;
import vietnam.traveltools.SearchActivity;
import vietnam.traveltools.SettingsActivity;
import vietnam.traveltools.ShortcutsActivity;
import android.app.Fragment;
import android.app.FragmentManager;
import android.support.v13.app.FragmentPagerAdapter;

public class TabsPagerAdapter extends FragmentPagerAdapter {

	public TabsPagerAdapter(FragmentManager fm) {
		super(fm);
	}


	@Override
	public Fragment getItem(int index) {

		switch (index) {
		case 0:
			return new SettingsActivity(); // Phai extends Fg ben cac Activity
		case 1:
			return new ShortcutsActivity(); // Phải support đúng v4 thì bên kia
											// phải
			// v4
		case 2:
			return new SearchActivity();

		case 3:
			return new MapsActivity();
		}
		return null;
	}

	@Override
	public int getCount() {
		return 4;
	}

}
